package com.lanou3g.code0510.anno;

import java.lang.annotation.Annotation;

/**
 * If there are no bugs, it was created by Chen FengYao on 2018/5/10;
 * Otherwise, I don't know who created it either
 */

public class Main {
    public static void main(String[] args) {
        MyServlet myServlet = new MyServlet();

        // 获取注解里面的值
        Class clazz = myServlet.getClass();

        // 获取注解
        MyAnno anno = (MyAnno) clazz.getAnnotation(MyAnno.class);

        String name = anno.name();
        String path = anno.path();

        System.out.println(name);
        System.out.println(path);


    }
}
